package com.ems.sys.service.impl;

import com.ems.sys.dao.Users_RolesMapper;
import com.ems.sys.pojo.Users_Roles;
import com.ems.sys.service.Users_RolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Users_RolesServiceImpl implements Users_RolesService {
    @Autowired
    private Users_RolesMapper users_rolesMapper;
    @Override
    public void addRole(List<Users_Roles> users_roles) {
        for (Users_Roles users_role : users_roles) {
            users_rolesMapper.insert(users_role);
        }

    }

    @Override
    public void deleteRole(String roleId) {
        users_rolesMapper.deleteByRoleId(roleId);
    }
}
